package com.sdj.quick.web.controller;

import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSON;
import com.sdj.quick.web.dto.BindCardQueryDto;

/***
 * 快捷绑卡查询
 * @author Administrator
 *
 */

@Controller
@RequestMapping("/bind")
public class BindCardQueryController extends BaseController{
	
	@RequestMapping("/toBindCardQuery")
	public String toBindCardQuery(){
		return "bindCardQuery";
	}

	@RequestMapping(value="/bindCardQuery",method=RequestMethod.POST)
	public @ResponseBody String bindCardQuery(BindCardQueryDto bindCardQueryDto){
		logger.info("快捷绑卡查询发送请求参数对象:【{}】",bindCardQueryDto);
		String merKey = bindCardQueryDto.getMerKey();
		String path = quickConfig.getBindCardQueryUrl();
		Map<String,String> map = getPostResult(path,merKey,bindCardQueryDto);
		return JSON.toJSONString(map);
	}
}
